π Notes for Lecture 12: Pure HTML Media Player
-
Navigation Structure:
-
Used a semantic
<header>
with<nav>
containing a list of links:<header> <nav> <ul> <li><a href="#home">Home</a></li> <li><a href="#audio">Audio</a></li> <li><a href="#video">Video</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> </ul> </nav> </header>
-
Used a semantic
-
Home Section:
-
Wrapped in
<section id="home">
with:<section id="home"> <h1>Hello,</h1> <h2>This is a Simple HTML Based Media Player</h2> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.β¦</p> </section>
-
Wrapped in
-
Audio Section (
<section id="audio">
):- Contains three
<div>
blocks with IDs:funny
,scary
,suspense
. - Each block embeds audio files using:
<audio src="./Assests/Audios/Squid Game/favorite.mp3" controls preload="metadata"></audio>
controls
adds play/pause/volume UI;preload="metadata"
loads metadata only.
- Contains three
-
Video Section (
<section id="video">
):- Header:
<h1 class="headline">Video Section</h1>
. - Three nested
<div>
blocks:harry
,dhruv
,itech
. - Each embeds six YouTube iframes, each sized
width="230" height="150"
. Example:<iframe width="230" height="150" src="https://www.youtube.com/embed/kqU2O7Kw_c8?si=INJqN5zt2lE71uH5" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
- Header:
-
About Section (
<section id="about">
):- Uses a Flex container to align an image and text side by side:
<div class="info"> <img src="./Assests/Images/image.jpg" alt="Logo" class="logo"> <div class="text"> <h2>Information About Us</h2> <p>Lorem ipsum dolor sit amet,β¦</p> </div> </div>
- Image styled to
max-width: 20%
with rounded corners; text block width at60%
.
- Uses a Flex container to align an image and text side by side:
-
Contact Section (
<section id="contact">
):- Contains a form with fields:
- Name (
type="text"
) β required - Email (
type="email"
,pattern
for email format) β required - City (
pattern="[A-Za-z\s]+"
) β required - Phone Number (
pattern="\d{12}"
) β required - Pincode (
pattern="\d{6}"
) β required - Message (
<textarea>
) β required
- Name (
- Submit button:
<input type="submit" value="Submit">
.
- Contains a form with fields:
-
Footer:
- Simple footer with copyright and portfolio link:
<footer> © 2025 All rights reserved. Designed by <a href="https://prashant-saini-22.vercel.app/" target="_blank">Prashant Saini</a> </footer>
- Simple footer with copyright and portfolio link:
-
CSS Styling (
style.css
):- Sticky
nav
bar with dark background, white text, and purple hover. - Heading colors:
h1 { color: darkslateblue; }
,h2 { color: #4f1d1d; }
. - Each section has
min-height: 100vh;
for full viewport coverage. - Section backgrounds:
#home { background-color: aqua; }
#audio { background-color: lightcoral; }
#video { background-color: gray; }
#about { background-color: lightblue; }
#contact { background-color: lightcyan; }
.info { display: flex; align-items: center; gap: 40px; }
for About layout..logo { max-width: 20%; border-radius: 10px; }
for the About image.
- Sticky
Hinglish: Lecture 12 mein humne ek pure HTML media player banaya jahan 6 audio aur 6 video files
display hui.
Header mein nav
se sections (Home, Audio, Video, About, Contact) create kiye.
Audio section mein teen categories (Squid Game Ringtones, Scary, Funny) me
<audio>
tag se files embed ki.
Video section mein teen categories (Code With Harry, Dhruv Rathi, I Tech World) me YouTube
iframes embed kiye.
About section mein ek image ke saath text side-by-side align kiya, using Flexbox.
Contact form mein required fields aur patterns se validation set ki.
Har section ko alag background color aur styling di gayi CSS file mein.
π» Live Code Preview β Media Player Demo
If the iframe doesnβt load, click
here to open Media Player Demo in a new tab.